#!/bin/bash

[[ -z ${z0series} || ${z0series} =~ ^# ]] && { exit 0; }
for zone in ${z0series}; do
  [[ -d "A${zone}" && -z "$(ls -A "A${zone}")" ]] && { rm -rf "A${zone}"; }
  [[ -d "M${zone}" && -z "$(ls -A "M${zone}")" ]] && { rm -rf "M${zone}"; }
  rm -rf "F${zone}"
  rm -rf "S${zone}"
  rm -rf "D${zone}"
  echo "$0: rm -rf A/M/F/S/D ${zone}"
done
